<ui:composition xmlns="http://www.w3.org/1999/xhtml"
                xmlns:h="http://java.sun.com/jsf/html"
                xmlns:f="http://java.sun.com/jsf/core"
                xmlns:ui="http://java.sun.com/jsf/facelets"
                xmlns:p="http://primefaces.prime.com.tr/ui"
                template="/templates/ui.xhtml">

    <ui:define name="head">
        <style type="text/css">
            .input-col-m {
                width: 60px;
            }

            .input-col-l {
                width: 80px;
            }

            .input-col-xxl {
                width: 1%;
                text-align: right;
            }

            .col-95 {
                text-align: right;
            }

            .col-5 {
                text-align: left;
            }
        </style>
        <script type="text/javascript" language="javascript">
            document.onkeydown = function TabReplace() {
                if (event.keyCode == 13) {
                    if (event.srcElement.tagName != 'BUTTON')
                        event.keyCode = 9;
                    else
                        event.srcElement.click();
                }
            }
        </script>

    </ui:define>

    <ui:define name="content">
        <div style="margin:5px;">
            <p:growl id="msgs" showDetail="false"/>
            <h:form id="form">

                <p:panel id="input" header="【实际用款】详细信息">
                    <h:panelGrid columns="1" cellspacing="2" style="width: 100%">
                        <h:panelGrid columns="1" cellspacing="2" style="width: 100%">

                            <p:fieldset legend="用款计划">
                                <h:panelGrid columns="1">
                                    <h:panelGrid columns="4" cellpadding="2" columnClasses="col-95,col-5,col-95,col-5"
                                                 style="width: 100%">
                                        <h:outputLabel value="计划编号:" for="planNo" style="margin-left: 28px;"/>
                                        <p:inputText id="planNo" value="#{payoutAction.rsPayout.businessNo}"
                                                     readonly="true" style="width:160px;"/>
                                        <h:outputLabel value="计划金额:" for="planAmt" style="margin-left: 30px;"/>
                                        <p:inputText id="planAmt" value="#{payoutAction.planCtrl.plAmount}"
                                                     readonly="true" style="width:160px;">
                                            <f:convertNumber pattern="#,###,###,###,##0.00"/>
                                        </p:inputText>
                                        <h:outputLabel value="可用金额:" for="avAmt" style="margin-left: 28px;"/>
                                        <p:inputText id="avAmt" value="#{payoutAction.planCtrl.avAmount}"
                                                     readonly="true" style="width:160px;">
                                            <f:convertNumber pattern="#,###,###,###,##0.00"/>
                                        </p:inputText>
                                        <h:outputLabel/><h:outputLabel/>
                                    </h:panelGrid>
                                </h:panelGrid>
                            </p:fieldset>

                            <p:fieldset legend="收款方信息">
                                <h:panelGrid columns="1">
                                    <h:panelGrid columns="4" cellpadding="2" columnClasses="col-95,col-5,col-95,col-5"
                                                 style="width: 100%">
                                        <h:outputLabel value="收款方账号:" for="toAccountCode" style="margin-left: 16px;"/>
                                        <p:inputText id="toAccountCode" value="#{payoutAction.rsPayout.recAccount}"
                                                     readonly="true" style="width:160px;"/>
                                        <h:outputLabel value="收款方户名:" for="toAccountName" style="margin-left: 17px;"/>
                                        <p:inputText id="toAccountName" value="#{payoutAction.rsPayout.recCompanyName}"
                                                     readonly="true" style="width:260px;"/>

                                        <h:outputLabel value="收款行:" for="toBankCode" style="margin-left: 16px;"/>
                                        <p:inputText id="toBankCode" value="#{payoutAction.rsPayout.recBankCode}"
                                                     readonly="true" style="width:160px;"/>
                                        <h:outputLabel value="收款行全称:" for="toBankName" style="margin-left: 17px;"/>
                                        <p:inputText id="toBankName" value="#{payoutAction.rsPayout.recBankName}"
                                                     readonly="true" style="width:260px;"/>
                                    </h:panelGrid>

                                </h:panelGrid>
                            </p:fieldset>
                            <p:fieldset legend="付款方信息">
                                <h:panelGrid columns="1">
                                    <h:panelGrid columns="4" cellspacing="2" style="width: 100%"
                                                 columnClasses="col-95,col-5,col-95,col-5">

                                        <h:outputLabel value="付款房产商:" for="companyName" style="margin-left:20px;"/>
                                        <h:inputText autocomplete="off" id="companyName" style="width:160px;"
                                                     readonly="true"
                                                     value="#{payoutAction.rsPayout.payCompanyName}">
                                        </h:inputText>

                                        <h:outputLabel value="付款监管账号:" for="accountCode"/>
                                        <p:inputText autocomplete="off" id="accountCode" style="width:160px;"
                                                     readonly="true"
                                                     value="#{payoutAction.rsPayout.payAccount}">
                                        </p:inputText>

                                        <h:outputLabel value="凭证号:" for="docNo"/>
                                        <p:inputText id="docNo" value="#{payoutAction.rsPayout.docNo}" readonly="true"
                                                     style="width:160px;"/>

                                        <h:outputLabel value="申请金额:" for="applyAmt" style="margin-left:20px"/>
                                        <p:inputText autocomplete="off" id="applyAmt" style="width:160px;"
                                                     readonly="true" value="#{payoutAction.rsPayout.plAmount}">
                                            <f:convertNumber pattern="#,###,###,###,##0.00"/>
                                        </p:inputText>

                                        <h:outputLabel value="申请人:" for="applyPerson"/>
                                        <p:inputText autocomplete="off" id="applyPerson" style="width:160px;"
                                                     readonly="true" value="#{payoutAction.rsPayout.applyUserName}">
                                        </p:inputText>

                                        <h:outputLabel value="申请时间:" for="applyDate"/>
                                        <p:inputText autocomplete="off" id="applyDate" style="width:160px;"
                                                     readonly="true" value="#{payoutAction.rsPayout.applyDate}">
                                        </p:inputText>

                                        <h:outputLabel value="审核人:" for="auditPerson"/>
                                        <p:inputText autocomplete="off" id="auditPerson" style="width:160px;"
                                                     readonly="true" value="#{payoutAction.rsPayout.auditUserName}">
                                        </p:inputText>

                                        <h:outputLabel value="审核时间:" for="auditDate"/>
                                        <p:inputText autocomplete="off" id="auditDate" style="width:160px;"
                                                     readonly="true" value="#{payoutAction.rsPayout.auditDate}">
                                        </p:inputText>

                                    </h:panelGrid>
                                    <h:panelGrid columns="2" cellspacing="2" style="width: 100%"
                                                 columnClasses="col-95,col-5">

                                        <h:outputLabel value="申请事由:" for="applyReason"
                                                       style="text-align: right;margin-left: 33px;"/>
                                        <p:inputText autocomplete="off" id="applyReason" style="width:425px;"
                                                     readonly="true" value="#{payoutAction.rsPayout.purpose}">
                                        </p:inputText>
                                        <h:outputLabel value="备注:" for="remark"
                                                       style="text-align: right;margin-left: 33px;"/>
                                        <p:inputText autocomplete="off" id="remark" style="width:425px;"
                                                     readonly="true" value="#{payoutAction.rsPayout.remark}">
                                        </p:inputText>
                                        <h:outputLabel/><p:separator/>

                                        <h:outputLabel/>
                                        <h:panelGroup>
                                            <h:outputLabel value="状态标志:" for="statusFlag"/>
                                            <h:outputText id="statusFlag"
                                                          value="#{payoutAction.statusFlag.valueOfAlias(payoutAction.rsPayout.statusFlag).title}"
                                                          readonly="true" style="width:160px;"/>
                                             <h:outputLabel/>
                                            <h:outputLabel value="处理结果:" for="workResult"/>
                                            <h:outputText id="workResult"
                                                          value="#{payoutAction.workResult.valueOfAlias(payoutAction.rsPayout.workResult).title}"
                                                          readonly="true" style="width:160px;"/>
                                        </h:panelGroup>
                                    </h:panelGrid>
                                </h:panelGrid>
                            </p:fieldset>
                        </h:panelGrid>
                        <h:panelGroup>
                            <p:separator/>
                        </h:panelGroup>
                        <h:panelGrid style="width: 20%" columns="1">
                            <p:commandButton ajax="true" id="resetBtn" value="关闭" onclick="window.close();"
                                             style="width:90px;margin-left:290px" update="input,msgs"/>
                        </h:panelGrid>
                    </h:panelGrid>
                </p:panel>
            </h:form>
        </div>
    </ui:define>

</ui:composition>